package com.iot08.common.entity.admin;

import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;
import java.util.Date;

@Data
@Document("mob_notify_push")
public class MobNotifyPush implements Serializable {
    private static final long serialVersionUID = 1L;

    @Field("_id")
    private String id;

    @Field("notify_id")
    private String notifyId;

    @Field("mob_batch_id")
    private String mobBatchId;

    //目标类型：1广播；2别名；3标签；4regid；5地理位置；6用户分群；9复杂地理位置推送
    private Integer target;

    //是否是定时任务：0否，1是
    @Field("task_cron")
    private Integer taskCron;

    //定时消息 发送时间， taskCron=1时必填 传入时间戳单位
    @Field("task_time")
    private Long taskTime;

    //每秒推送数量 只是趋势
    private Integer speed;

    //离线消息保存时间，默认0
    @Field("offline_seconds")
    private Integer offlineSeconds;

    private String content;

    private String creator;

    //0=正常；1=删除
    private Integer deleted;

    @Field("create_time")
    private Date createTime;

    @Field("update_time")
    private Date updateTime;

    @Transient
    private Integer iosProduction;
    @Transient
    private Boolean isDetail = true;
}
